Sprites, or cursors, are widely used in display systems as pointers to data displayed on a video display unit (VDU) of the system. Typically, a user controls the position of the sprite by means of an input device, such as a keyboard, mouse, or joystick. The image that the sprite displays is defined by a sprite character which is stored in an area of bit-mapped memory referred to as a sprite RAM. During typical operation, the sprite character overlays a portion of an image that would normally be displayed at the pixel position occupied by the sprite. A sprite character is stored in a sprite random access memory (RAM) and comprises a number of sprite data bits which are active (=1) when the sprite is to be displayed at the particular pixel location and inactive (=0) when the underlying image is to be displayed. Sprites of fixed size are usually implemented in hardware such that their position on screen is controlled by X and Y position data generated by the input device and stored in X and Y position registers.
A common problem which arises in connection with the use of sprites in display systems is that it is often difficult to perceive the sprite, especially when the color of the sprite is close to that of the underlying display pixel data.
A solution to the above problem involves the use of a blinking circuit in conjunction with a sprite, which will cause the sprite to blink whenever it is displayed. Although this method improves the visibility of the sprite in some situations, it fails to do so when the color and intensity of the sprite is the same as or similar to the color and intensity of the image upon which the sprite is overlaid. In addition, it may be difficult to track a blinking sprite while it is being moved across a display screen, as the sprite will momentarily disappear at one point on the screen and then reappear shortly thereafter at another point on the screen.
Another solution to the above problem involves the use of a sprite in the form of an "underline," which is typically a bright, short line located below the lowest row of the character display area. However, while such an underline sprite is visible when used among large characters, it may be difficult to find in a group of closely spaced small characters, without excessive concentration.
Another solution to the above problem involves the use of what is commonly known as an exclusive OR (XOR) sprite. XOR sprites have attained great popularity in the recent years due to their partial success in insuring that the color of the sprite is different from that of the displayed image by inverting all bits of display pixel data underlying the active pixels of the sprite and using this inverted data as the sprite color.
XOR sprites, however, have certain disadvantages. First, the implementation of a conventional XOR sprite in display system not only slows down the system, but also increases the cost of the system, as a separate inverter, or XOR gate, is required to invert each bit of pixel data of the underlying image when the sprite is to be displayed. For example, implementing an XOR sprite in a 24-bit-per-pixel color display system would require twenty-four (24) XOR gates. Furthermore, although prior art XOR sprites are highly visible on certain color backgrounds, the visibility of an XOR sprite will be at a minimum when the color of the underlying image is a half intensity, or mid-level gray, represented by pixel data comprising 7F7F7Fh or 808080h. The reason for this is that when the bits of pixel data are converted, the resulting pixel data corresponds to another mid-level gray shade. For example, converting all the bits of pixel data comprising 7F7F7Fh (mid-level gray) results in pixel data comprising 808080h, which is also a mid-level gray. Coincidentally, such mid-level gray shades are is the most widely used color(s) in computer graphics applications.
Therefore, what is needed is a method and apparatus for adjusting the color of a sprite such that it is always visually distinguishable from the underlying image, even when the color of the underlying image pixels is a mid-level gray, while simultaneously reducing the cost of circuitry and increasing the speed of a display system in which it is implemented.